package org.gavin.core.exception;

import org.gavin.core.domain.Status;

public class ParamException extends BaseException{


    public ParamException(String module, Integer code, Object args, String msg) {
        super(module,code,args,msg);
    }

    public static ParamException le(String module, Integer code, Object args, String msg){
        return new ParamException(module,code,args,msg);
    }

    public static <T extends Status> ParamException le(T status, String module, Object args ){
        return new ParamException(module,status.getCode(),args,status.getMsg());
    }

    public static <T extends Status> ParamException le(T status){
        return new ParamException(null,status.getCode(),null,status.getMsg());
    }
}
